<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><? echo(ucfirst(exec("/bin/hostname"))); ?>: <? echo(ucfirst(exec("/bin/uname -n"))); ?>
</title>
<link rel="stylesheet" type="text/css" href="css.css" />
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
</head>
<body style="background-color:#eee; ">
<center>
<table cellpadding=0 cellspacing=0><tr><td style="background-color:#ddf;"><? //echo(ucfirst(exec("/bin/uname -n")));?></td></tr>
<tr><td class=main style="background-color:#ddf;">
	<table width=400> 
	<tr><td colspan=2 align=center><img src="images/uggla_150px.png" alt="branding"></td></tr>
	<tr><td><font size=-2><? echo(exec("/bin/uname -nsmro"));?></font></td></tr>
	</table>
	<hr style="height: 1px; border: 1px solid #339" noshade width=100%>
        <form action="login.php" method="POST">
	<table style="width:400px;margin-left:1em">
	<tr><td>inloggningsnamn: </td><td><input type="text" name="user" maxlength="20" style="color: Black; border: solid 1px; width: 15em"></td></tr>
	<tr><td>lösenord: </td><td><input type="password" name="pass" maxlength="20" style="color: Black; border: solid 1px; width: 15em"></td></tr>
	<tr><td colspan=2 align=center><input type="submit" value="                    Logga in                    " style="color: Black; background: #CCE; border: 2px #339 outset"></td></tr>
	</table>
        </form>
	<br>
<?php
	function error($desc) {
		echo "<table width=400><tr><td class=\"error\"><table><tr><td valign=top><img src=\"images/error.png\"></td><td valign=top>".$desc."</td></tr></table></td></tr></table>";
	}
	function info($desc) {
		echo "<table width=400><tr><td class=\"info\"><table><tr><td valign=top><img src=\"images/info.png\"></td><td valign=top>".$desc."</td></tr></table></td></tr></table>";
	}
	if(isset($_GET["l"])) {
		switch ( $_GET['l'] ) {
		case 1:
			//error("Du måste logga in först");
			break;
		case 2:
			error("Du har blivit automatiskt utloggad på grund av inaktivitet");
			break;
		case 3:
			error("Fel lösenord eller användarnamn");
			break;
		case 4:
			info("Du är nu utloggad");
			break;
		}
	}
?>	

</td></tr></table>
</center>
</body>
</html>
